package a.f;

import a.c.d;
import a.c.k;
import a.c.m;
import a.c.q;
import a.d.w;
import a.d.z;

import java.util.HashMap;
import java.util.Map;

public class yb
{
  private static final String a = "PARTITION_ORIENTATION_DPKEY";
  private final Map c = new HashMap();
  private final Map e = new HashMap();
  public static boolean f;
  
  private static byte a(q paramq)
  {
    k localk = paramq.c("PARTITION_ORIENTATION_DPKEY");
    if ((o.eg) || (localk != null))
    {
      cb localcb = (cb)localk.get(paramq);
      return localcb.b();
    }
    return 0;
  }
  
  static boolean c(q paramq)
  {
    k localk = paramq.c("PARTITION_ORIENTATION_DPKEY");
    if ((o.eg) || (localk != null))
    {
      cb localcb = (cb)localk.get(paramq);
      return localcb.b(localcb.b());
    }
    return false;
  }
  
  public void d(q paramq)
  {
    boolean bool = o.eg;
    int j = o.dg;
    k localk = paramq.c(oc.a);
    if (localk != null)
    {
      m localm = paramq.w();
      label145:
      label147:
      do
      {
        do
        {
          if (!localm.e()) {
            return;
          }
          d locald = localm.a();
          kc[] arrayOfkc = (kc[])localk.get(locald);
          if (arrayOfkc != null)
          {
            int i = 0;
            do
            {
              if (i >= arrayOfkc.length) {
                break;
              }
              kc localkc = arrayOfkc[i];
              fd localfd1 = localkc.g();
              fd localfd2 = a(localfd1);
              this.e.put(localfd2, localfd1);
              localkc.a(localfd2);
              i++;
              if (bool) {
                break label147;
              }
              if (j != 0) {
                break label145;
              }
            } while (j == 0);
          }
        } while (bool);
        localm.f();
      } while (j == 0);
    }
  }
  
  public void e(q paramq)
  {
    boolean bool = o.eg;
    int j = o.dg;
    k localk = paramq.c(oc.a);
    if (localk != null)
    {
      m localm = paramq.w();
      label139:
      label141:
      do
      {
        do
        {
          if (!localm.e()) {
            return;
          }
          d locald = localm.a();
          kc[] arrayOfkc = (kc[])localk.get(locald);
          if (arrayOfkc != null)
          {
            int i = 0;
            do
            {
              if (i >= arrayOfkc.length) {
                break;
              }
              kc localkc = arrayOfkc[i];
              fd localfd1 = localkc.g();
              fd localfd2 = (fd)this.e.get(localfd1);
              localkc.a(localfd2);
              i++;
              if (bool) {
                break label141;
              }
              if (j != 0) {
                break label139;
              }
            } while (j == 0);
          }
        } while (bool);
        localm.f();
      } while (j == 0);
    }
  }
  
  public void a(q paramq, kc paramkc, tb paramtb)
  {
    if (this.c.containsKey(paramkc)) {
      return;
    }
    fd localfd1 = paramkc.g();
    tb localtb = a(paramq, paramtb);
    b_ localb_ = new b_(localfd1, localtb, null);
    this.c.put(paramkc, localb_);
    fd localfd2 = a(localfd1);
    fd localfd3 = a(paramq, localfd2, localtb);
    paramkc.a(localfd3);
    a(paramkc, paramtb);
  }
  
  private fd a(fd paramfd)
  {
    boolean bool = o.eg;
    int i = o.dg;
    fd localfd = new fd(paramfd);
    if (!bool)
    {
      if (paramfd.j())
      {
        localfd.a((byte)1);
        if (bool) {
          break label79;
        }
        if (i == 0) {
          break label75;
        }
      }
      if (bool) {}
    }
    else if (paramfd.k())
    {
      localfd.a((byte)4);
      if (bool) {
        break label79;
      }
      if (i == 0) {
        break label75;
      }
    }
    localfd.a((byte)2);
    label75:
    label79:
    if (!bool)
    {
      if (paramfd.n())
      {
        localfd.b((byte)16);
        if (bool) {
          break label139;
        }
        if (i == 0) {
          break label135;
        }
      }
      if (bool) {}
    }
    else if (paramfd.o())
    {
      localfd.b((byte)8);
      if (bool) {
        break label139;
      }
      if (i == 0) {
        break label135;
      }
    }
    localfd.b((byte)32);
    label135:
    label139:
    if (!bool)
    {
      if (paramfd.w())
      {
        localfd.c((byte)1);
        if (bool) {
          break label201;
        }
        if (i == 0) {
          break label192;
        }
      }
      if (bool) {}
    }
    else if (paramfd.x())
    {
      localfd.c((byte)2);
      if (bool) {
        break label201;
      }
      if (i == 0) {
        break label192;
      }
    }
    localfd.c((byte)4);
    label192:
    if (!bool) {
      if (paramfd.r())
      {
        label201:
        localfd.d((byte)2);
        if (bool) {
          break label232;
        }
        if (i == 0) {
          break label223;
        }
      }
    }
    localfd.d((byte)1);
    label223:
    if (!bool) {
      if (paramfd.s())
      {
        label232:
        localfd.e((byte)1);
        if (bool) {
          break label263;
        }
        if (i == 0) {
          break label254;
        }
      }
    }
    localfd.e((byte)2);
    label254:
    if (!bool) {
      if (paramfd.u())
      {
        if (bool) {
          break label286;
        }
        localfd.f((byte)1);
        if (i == 0) {
          return localfd;
        }
      }
    }
    label263:
    localfd.f((byte)2);
    label286:
    return localfd;
  }
  
  public void a(q paramq, kc paramkc)
  {
    w localw1 = paramkc.a().l();
    w localw2 = a(paramq, localw1);
    b_ localb_ = (b_)this.c.get(paramkc);
    if (!o.eg)
    {
      if (localb_ != null)
      {
        paramkc.a(a(localb_.a));
        a(paramkc, localb_.b);
        paramkc.a(localb_.a);
        this.c.remove(paramkc);
      }
      paramkc.a().b(localw2);
    }
  }
  
  private fd a(q paramq, fd paramfd, tb paramtb)
  {
    boolean bool = o.eg;
    fd localfd = new fd(paramfd);
    byte b = b(paramq, paramfd, paramtb);
    localfd.b(b);
    localfd.c((byte)1);
    double d = d(paramq, paramfd, paramtb);
    if (!bool)
    {
      if (paramfd.p())
      {
        if (!bool)
        {
          if (localfd.t()) {
            d = 3.141592653589793D - d;
          }
          if (bool) {
            break label127;
          }
        }
        if (localfd.v()) {
          d += 3.141592653589793D;
        }
      }
      localfd.a(d);
      localfd.d((byte)2);
      localfd.e((byte)1);
      localfd.f((byte)1);
    }
    label127:
    return localfd;
  }
  
  private byte b(q paramq, fd paramfd, tb paramtb)
  {
    boolean bool = o.eg;
    byte b = paramfd.b();
    if ((bool) || ((!paramfd.x()) || ((bool) || ((paramtb != tb.c) && (paramtb != tb.d)))))
    {
      if (bool) {
        break label85;
      }
      if ((!paramfd.y()) || ((!bool) && ((paramtb != tb.c) && (paramtb != tb.b)))) {}
    }
    else
    {
      b = a(b);
    }
    label85:
    if (!bool) {
      if (c(paramq)) {
        b = a(b);
      }
    }
    return b;
  }
  
  private double d(q paramq, fd paramfd, tb paramtb)
  {
    boolean bool = o.eg;
    int i = o.dg;
    double d = paramfd.d();
    if (!bool)
    {
      if (paramfd.r()) {
        d += 0.0D;
      }
    }
    else
    {
      if (bool) {
        break label151;
      }
      if (i == 0) {
        break label147;
      }
    }
    if (!bool) {
      if (paramtb == tb.b)
      {
        d += 0.0D;
        if (bool) {
          break label151;
        }
        if (i == 0) {
          break label147;
        }
      }
    }
    if (!bool) {
      if (paramtb == tb.a)
      {
        d += 1.570796326794897D;
        if (bool) {
          break label151;
        }
        if (i == 0) {
          break label147;
        }
      }
    }
    if (!bool) {
      if (paramtb == tb.d)
      {
        d += 3.141592653589793D;
        if (bool) {
          break label151;
        }
      }
    }
    if ((i != 0) && (paramtb == tb.c)) {
      d += 4.71238898038469D;
    }
    label147:
    if (c(paramq)) {
      label151:
      d = 3.141592653589793D - d;
    }
    return d;
  }
  
  private w a(q paramq, w paramw)
  {
    boolean bool = o.eg;
    int i = a(paramq);
    if (!bool) {
      if (c(paramq))
      {
        if (!bool) {
          switch (i)
          {
          case 0: 
            return new w(-paramw.a(), paramw.b());
          case 1: 
            return new w(paramw.b(), paramw.a());
          case 3: 
            return new w(-paramw.b(), -paramw.a());
          case 2: 
            return new w(paramw.a(), -paramw.b());
          }
        }
        if ((!bool) && (o.dg == 0)) {
          return paramw;
        }
      }
    }
    switch (i)
    {
    case 0: 
      return paramw;
    case 1: 
      return new w(paramw.b(), -paramw.a());
    case 3: 
      return new w(-paramw.b(), paramw.a());
    case 2: 
      return new w(-paramw.a(), -paramw.b());
    }
    return paramw;
  }
  
  private static tb a(q paramq, tb paramtb)
  {
    boolean bool2 = o.eg;
    boolean bool1 = c(paramq);
    if (!bool2)
    {
      if (!bool1) {
        break label38;
      }
      if (bool2) {
        break label35;
      }
    }
    label35:
    label38:
    tb localtb = paramtb.d() ? paramtb.c() : paramtb;
    switch (a(paramq))
    {
    case 0: 
      return localtb;
    case 2: 
      return localtb.c();
    case 1: 
      return localtb.b();
    case 3: 
      return localtb.a();
    }
    return null;
  }
  
  public static tb a(tb paramtb, byte paramByte, int paramInt)
  {
    boolean bool2 = o.eg;
    boolean bool1 = a(paramByte, paramInt);
    if (!bool2)
    {
      if (!bool1) {
        break label39;
      }
      if (bool2) {
        break label36;
      }
    }
    label36:
    label39:
    tb localtb = paramtb.d() ? paramtb.c() : paramtb;
    switch (paramByte)
    {
    case 0: 
      return localtb;
    case 2: 
      return localtb.c();
    case 1: 
      return localtb.b();
    case 3: 
      return localtb.a();
    }
    return null;
  }
  
  public static boolean a(byte paramByte, int paramInt)
  {
    boolean bool = o.eg;
    if (!bool) {
      switch (paramByte)
      {
      case 0: 
        if (!bool) {}
        return (0x1 & paramInt) != 0;
      case 3: 
        if (!bool) {}
        return (0x2 & paramInt) != 0;
      case 2: 
        if (!bool) {}
        return (0x4 & paramInt) != 0;
      case 1: 
        if (!bool) {}
        return (0x8 & paramInt) != 0;
      }
    }
    return false;
  }
  
  private byte a(byte paramByte)
  {
    if (!o.eg) {
      switch (paramByte)
      {
      case 16: 
        return 32;
      case 32: 
        return 16;
      }
    }
    return 8;
  }
  
  public static void a(kc paramkc, tb paramtb)
  {
    z localz = a(paramkc.g(), paramtb);
    a.d.o localo = paramkc.a();
    localo.c(localz.a(), localz.b());
    paramkc.a(localo);
  }
  
  public static z a(fd paramfd, tb paramtb)
  {
    boolean bool = o.eg;
    int i = o.dg;
    double d1 = 0.0D;
    if (!bool) {
      if (paramfd.q())
      {
        if (bool) {
          break label139;
        }
        d1 = 0.0D;
        if (i == 0) {
          break label135;
        }
      }
    }
    if (!bool) {
      if (tb.b.equals(paramtb))
      {
        if (bool) {
          break label139;
        }
        d1 = 0.0D;
        if (i == 0) {
          break label135;
        }
      }
    }
    if (!bool) {
      if (tb.c.equals(paramtb))
      {
        if (bool) {
          break label139;
        }
        d1 = 1.570796326794897D;
        if (i == 0) {
          break label135;
        }
      }
    }
    if (!bool) {
      if (tb.d.equals(paramtb))
      {
        if (bool) {
          break label139;
        }
        d1 = 3.141592653589793D;
      }
    }
    if ((i != 0) && (tb.a.equals(paramtb))) {
      d1 = 4.71238898038469D;
    }
    label135:
    label139:
    double d2 = paramfd.d();
    if ((bool) || (paramfd.p()))
    {
      if (!bool) {
        if (paramfd.t()) {
          d2 = -d2;
        }
      }
      if (paramfd.v()) {
        d2 -= 3.141592653589793D;
      }
    }
    return a(d1 + d2);
  }
  
  public static z a(double paramDouble)
  {
    return new z(Math.sin(paramDouble), -Math.cos(paramDouble));
  }
  
  private static class b_
  {
    private final fd a;
    private final tb b;
    
    private b_(fd paramfd, tb paramtb)
    {
      this.a = paramfd;
      this.b = paramtb;
    }
    
    b_(fd paramfd, tb paramtb, yb.0 param0)
    {
      this(paramfd, paramtb);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.yb

 * JD-Core Version:    0.7.0.1

 */